At present, a traditional switching power supply detects whether the feedback voltage sampling resistor is shorted or not only after the chip finishes its start-up. Once a shorted sampling resistor is detected, the output of the chip is turned off. As for the traditional switching power supply, when the upper voltage sampling resistor is shorted, the feedback voltage is so high that it exceeds the allowable voltage, the protection action is activated and the output of the chip is turned off; and when the lower voltage sampling resistor is shorted, the voltage feedback signal includes no demagnetization signal or the voltage of the port VDD is too high, such that the protection action is activated and the output of the chip is turned off. FIG. 1 is a diagram illustrating the working waveforms of the traditional switching power supply when the sampling resistor is shorted. Once a shorted sampling resistor is detected, the signal FB_SHORT is set to be a high level and latched, and the output of the chip is turned off to make the voltage of the port VDD be reduced to the minimum allowed. The chip is then reset, all states are cleared, and the chip is restarted. After the chip finishes its start-up, it is detected whether the voltage sampling resistor is shorted or not once again. Once a shorted sampling resistor is detected, the working process above is repeated.
The working mode above can realize turning off the output of the chip when the voltage sampling resistor is shorted, thereby protecting the chip, but through this protection manner, a short-circuit of the voltage sampling resistor can be detected only after a certain number of cycles of the switching operation, and thereby activating a protection action. As shown in FIG. 2, when the upper voltage sampling resistor is shorted, once the switching transistor is turned on, the current from the port FB will be so large that it will burn the ESD connected with the voltage feedback port FB and damage the chip. When the upper voltage sampling resistor is shorted, the current from the voltage feedback port FB is
      I    =                            N          P                          N          A                    *      Ipeak        ,wherein Ipeak is the maximum current of the primary side when the switching transistor is on. For example, when Ipeak=600 mA, and NP/NA=17, the current is 10.2 A, and there is a risk of burning the ESD connected with the port FB.
Through this protection manner, a short-circuit of the voltage sampling resistor can be detected only after the chip finishes its start-up and after a certain number of cycles of switching operation, as a result, the input power is relatively larger.